<!DOCTYPE HTML>
<html>
<!--_meta 作为公共模版分离出去-->
{include file="common/_meta"}
<!--/meta 作为公共模版分离出去-->

<body>
<!--_header 作为公共模版分离出去-->
{include file="common/_header"}
<!--/_header 作为公共模版分离出去-->
<!--_menu 作为公共模版分离出去-->
{include file="common/_menu"}
<!--/_menu 作为公共模版分离出去-->

<section class="Hui-article-box">
<!--_nav 作为公共模版分离出去-->
{include file="common/_nav"}
<!--/_nav 作为公共模版分离出去-->
<div class="Hui-article">
<article class="cl pd-20">
	<form action="" method="post" class="form form-horizontal" id="form-adminrole-add">
		<div class="row cl">
			<label class="form-label col-xs-2 col-sm-1"><span class="c-red">*</span>分组名称：</label>
			<div class="formControls col-xs-6 col-sm-3">
				<input type="text" class="input-text" value="" placeholder="" id="roleName" name="roleName" datatype="*4-16" nullmsg="用户账户不能为空">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-1">权限分配：</label>
			<div class="formControls col-xs-8 col-sm-9">
				{foreach $data as $value}
				<dl class="permission-list">
					<dt>
						<label><input type="checkbox" value="{$value.id}" data-pid="{$value.pid}" name="permit[]" id="permit-{$value.pid}-{$value.id}">{$value.permi_name}</label>
					</dt>
					<dd>
					{notempty name="value._child" }
					{foreach $value._child as $val}
						<label class=""><input type="checkbox" value="{$val.id}" data-pid="{$val.pid}" name="permit[]" id="permit-{$val.pid}-{$val.id}"> {$val.permi_name}</label>
					{/foreach}
					{/notempty}
					</dd>
				</dl>
				{/foreach}
				<dl class="permission-list">
					<dt>
						<label class="c-orange"><input type="checkbox" value="1" name="oneself" id="oneself"> 只能操作自己发布的</label>
					</dt>
					<dd></dd>
				</dl>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-2 col-sm-1">备注：</label>
			<div class="formControls col-xs-6 col-sm-3">
				<input type="text" class="input-text" value="" placeholder="" id="" name="note">
			</div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
				<button type="submit" class="btn btn-success radius" id="admin-role-save" name=""><i class="icon-ok"></i> 确定</button>
			</div>
		</div>
	</form>
</article>
</div>
</section>


<!--_footer 作为公共模版分离出去-->
{include file="common/_footer" /}
<!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本--> 
<script type="text/javascript">
$(function(){
	$(".permission-list dt input:checkbox").click(function(){
		$(this).closest("dl").find("dd input:checkbox").prop("checked",$(this).prop("checked"));
	});
	$(".permission-list dd input:checkbox").click(function(){
		$(this).closest("dl").find("dt input:checkbox").prop("checked",$(this).prop("checked"));
	});

})

</script>
<!--请在上方写此页面业务相关的脚本--> 
</body>
</html>